package cn.itsource.org.mapper;

import cn.itsource.org.domain.Department;
import cn.itsource.org.query.DepartmentQuery;

import java.util.List;

/**
 * 部门持久层
 */
public interface DepartmentMapper {
    /**
     * 新增
     * @param department
     */
    void save(Department department);

    /**
     * 修改
     * @param department
     */
    void update(Department department);

    /**
     * 删除
     * @param id
     */
    void delete(Long id);

    /**
     * 根据id查询
     * @param id
     * @return
     */
    Department queryById(Long id);

    /**
     * 查询全部
     * @return
     */
    List<Department> queryAll();

    /**
     * 高级查询，分页查询
     * @param query
     * @return
     */
    Long count(DepartmentQuery query);
    List<Department> queryDate(DepartmentQuery query);

    /**
     * 批量删除
     * @param ids
     */
    void patchDel(Long[] ids);

    /**
     * 获取部门树方法
     * @return
     */
    List<Department> getDeptTree();

}
